
// PrepaidAmount.java

package com.ruoyi.hospital.entity.check;

import com.ruoyi.hospital.entity.HospitalBillVO;
import com.ruoyi.hospital.entity.TravelChargeVO;

/**
 * 预付费用
 */
@lombok.Data
public class CheckPrepaidAmount {
    /**
     * 预付的服务费
     */
    private Long serviceAmount;
    /**
     * 预付的耗材费
     */
    private Long consumablesAmount;
    /**
     * 预付的行程费
     */
    private Long taxiAmount;
    /**
     * 总预付金额
     */
    private Long totalAmount;

    public void init(HospitalBillVO hospitalCharge, TravelChargeVO travelCharge) {
        this.serviceAmount = hospitalCharge.getBill();
        this.consumablesAmount = hospitalCharge.getAdvanceMoney() - hospitalCharge.getBill();
        this.taxiAmount = travelCharge.getAdvancePrice();
        this.totalAmount = this.getServiceAmount() + this.getConsumablesAmount() + this.getTaxiAmount();
    }
}
